﻿<cfscript>
    view = createObject("component", "views.layout");
    view.init("Dynamic Group Management", 
        "/jquery/ui-1.8.10/jquery-ui.min.js, /#session.rootDir#/static/js/search.js", 
        "/jquery/ui-1.8.10/themes/cupertino/jquery-ui-1.8.10.custom.css", main);
    view.setSideBar("noSidebar");
    view.html();        
</cfscript>

<cffunction name="main" access="public" output="true" returntype="any">
    <style>
        ul.ui-autocomplete{text-align:left;}
    </style>
    <cfscript>
        import models.*;
        Groups = createObject("component", "#session.rootDir#.objects.Groups").init();
        Users = createObject("component", "#session.rootDir#.objects.Users").init();
        AjaxController = '/#session.rootDir#/controller/AjaxHandler.cfm';
        ViewUser = "/#session.rootDir#/users/viewuser.cfm?ADUser=";
        ViewGroup = "/#session.rootDir#/groups/viewgroup.cfm?ADGroup=";
    </cfscript>
    
    <cfform name="myfrm">
        <input type="hidden" id="ViewUser" value="#ViewUser#"/ >
        <input type="hidden" id="ViewGroup" value="#ViewGroup#"/ >
        <cfinput type="hidden" value="#AjaxController#" name="AjaxController" />
        <cfinput type="hidden" value="" name="GroupDN" />
        
        <table>
            <tr>
                <td>
                    <strong>Group Search</strong> 
                    <img src="/#SESSION.RootDir#/images/progress.gif" id="GroupProgress" style="display:none;" align="absmiddle" />
                </td>
                <td>
                    <strong>User Search</strong> 
                    <img src="/#SESSION.RootDir#/images/progress.gif" id="UserProgress" style="display:none;" align="absmiddle"/>
                </td>
            </tr>
            <tr>
                <td ><cfinput type="text" value="" name="GroupSearch" size="30" /></td>                
                <td ><cfinput type="text" value="" name="UserSearch" size="30" /></td>
            </tr>
        </table>
    </cfform>
</cffunction>
